<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>旋转</title>
  <style>
    body {
      width: 800px;
      height: 800px;
    }

    img {
      width: 200px;
      border: 1px solid #000;
      transition: all 2s;

      /* 以右下角为中心旋转 */
      transform-origin: right bottom;
    }

    img:hover {
      /* 正数顺时针旋转，负数逆时针旋转 */
      transform: rotate(360deg);
    }
  </style>
</head>

<body>
  <img src="../../images/rotate.png" alt="">
</body>

</html>